package com.bwie.task;

import com.bwie.mapper.UserMapper;
import com.bwie.mq.MessageConsumer2;
import com.bwie.mq.MessageProduct2;
import com.bwie.pojo.po.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class SpringTask2 {
    @Autowired
    public MessageProduct2 messageProduct2;
    @Autowired
    public UserMapper userMapper;

    @Scheduled(cron = "* * 0 * * ?")
    public void user(){
        User user= userMapper.login("张三");
        messageProduct2.setAmqpTemplate(user);
    }


}
